#include "legoland.h"

using namespace std;

class analyzeREADS{

public:
    short unsigned int k_min;                       //k-mer size minimum
    short unsigned int k_max;                       //k-mer size maximum
    unsigned int r;                                 //read size
    char * reference_library_file;                  //file name of the reference library

    int num_gs;                                     //number of genus/species in reference library
    char ** taxa;                                   //decryption table for code representation of genus/species

    int num_read_files;                              //number of files that include reads
    char * file_of_files_reads;                      //if multiple files, a file that lists all of the files

    char * x_axis_file;                              //file used to define the x axis
    char * y_axis_file;                              //file used to define the y axis

    char * output_file_tag;                          //several files will be written... all will begin with this tag indicating this read set's analysis

    legoland ** l;                                   //library

    analyzeREADS();
    ~analyzeREADS();

    bool lookup(unsigned short code, char *& name);
    bool generate_output_files();

private:
    bool load_library();
    short unsigned int gc_dim1;             //GC content to create dimension 1
    short unsigned int gc_dim2;             //GC content to create dimension 2
    char * gc_dim1_file;                    //GC content dimension 1 file name
    char * gc_dim2_file;                    //GC content dimension 2 file name
    int sensi;                              //sensitivity value

    bool get_reference_library();
    bool get_k_range();
    bool get_read_file();
    bool get_outputfile_name();
    bool get_parameters();

    short int format(bool & fof);
    bool analyze();
    bool map_file(short int format_file, bool fof, char * file_to_open, short unsigned int k_value);

    bool print_probability_statistics(int & num_reads);
    bool print_summary_statistics(int & num_reads);
};
